﻿// ***********************************************************************
// Assembly         : MVC4Portal
// Author           : Lolo
// Created          : 08-29-2013
//
// Last Modified By : Lolo
// Last Modified On : 10-21-2013
// ***********************************************************************
// <copyright file="Contact_ContactAddress_MetaModel.cs" company="">
//     Copyright (c) . All rights reserved.
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using InnovaApp.Layers.MetaDataLayer;
using INNOVACALL.Framework.Common.MVCHelpers.Localization;
using System.ComponentModel.DataAnnotations;

namespace InnovaApp.Portals.MVC4Portal.Models.MetaModels.ContactManagement
{
    /// <summary>
    /// Class Contact__AdressType__ContactAddress_MetaModel
    /// </summary>
    public class Contact_ContactAddress_MetaModel : Contact_ContactAddress_MetaData
    {
        /// <summary>
        /// Gets or sets a value indicating whether this instance is post address.
        /// </summary>
        /// <value><c>true</c> if this instance is post address; otherwise, <c>false</c>.</value>
        [Display(ResourceType = typeof(InnovaApp.Layers.ResourcesLayer.Properties.Resources),Name = "Ety_ContactAddress_IsPostAddress")]
        public bool IsPostAddress { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether this instance is delivery address.
        /// </summary>
        /// <value><c>true</c> if this instance is delivery address; otherwise, <c>false</c>.</value>
        [Display(ResourceType = typeof(InnovaApp.Layers.ResourcesLayer.Properties.Resources),Name = "Ety_ContactAddress_IsDeliveryAddress")]
        public bool IsDeliveryAddress { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether this instance is invoicing address.
        /// </summary>
        /// <value><c>true</c> if this instance is invoicing address; otherwise, <c>false</c>.</value>
        [Display(ResourceType = typeof(InnovaApp.Layers.ResourcesLayer.Properties.Resources),Name = "Ety_ContactAddress_IsInvoicingAddress")]
        public bool IsInvoicingAddress { get; set; }
        /// <summary>
        /// Gets or sets the contact address.
        /// </summary>
        /// <value>The contact address.</value>
        [Display(ResourceType = typeof(InnovaApp.Layers.ResourcesLayer.Properties.Resources),Name = "Ety_ContactAddress_Address")]
        public ContactAddress_MetaModel ContactAddress { get; set; }
        /// <summary>
        /// Gets or sets the dialog automatic close.
        /// </summary>
        /// <value>The dialog automatic close.</value>
        public string DialogToClose { get; set; }
        /// <summary>
        /// Get country list from CulturInfo
        /// </summary>
        /// <value>The countries.</value>
        public List<SelectListItem> Countries
        {
            get
            {
                List<SelectListItem> toReturn;
                toReturn = CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures).Select(c => new SelectListItem
                {
                    Text = c.EnglishName,
                    Value = c.DisplayName
                }).ToList();
                return toReturn;
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="Contact_ContactAddress_MetaModel"/> class.
        /// </summary>
        public Contact_ContactAddress_MetaModel()
        {
        }
    }
}